package com.testMvc.testSpring;

import com.core.spring.DefaultMyApplication;
import com.core.spring.MyApplication;

public class testSpring {
    public static void main(String[] args) throws Exception {
        //初始化容器
        DefaultMyApplication ap = new DefaultMyApplication();
        //通过名字获取
        CustAction ca = (CustAction) ap.getBean("CustAction");
        ca.testSpring();
        //通过接口获取
        CustService cs=  ap.getBean(CustService.class);
        cs.speak();
    }


}
